-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9.) graph based decoding #1613
base: saxelrod-delete-old-detect-code
Are you sure you want to change the base?
9.) graph based decoding #1613
Conversation
2c604cf
to
d4d995c
Compare
d4d995c
to
4f75af8
Compare
8f72169
to
1e62cbe
Compare
016f5fb
to
d654f41
Compare
Codecov Report
@@ Coverage Diff @@
## saxelrod-delete-old-detect-code #1613 +/- ##
===================================================================
+ Coverage 89.87% 90.24% +0.37%
===================================================================
Files 219 221 +2
Lines 8117 8550 +433
===================================================================
+ Hits 7295 7716 +421
- Misses 822 834 +12
Continue to review full report at Codecov.
|
d702eae
to
60ac93e
Compare
f2cc8cf
to
2879c3c
Compare
52e5912
to
7e24890
Compare
431ad13
to
9ac3b89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we really need @dganguli to review this.
@@ -122,6 +126,449 @@ def _build_intensity_table( | |||
return intensity_table | |||
|
|||
|
|||
def _build_spot_traces_per_round( | |||
round_dataframes: Dict[int, pd.DataFrame], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
round_dataframes: Dict[int, pd.DataFrame], | |
round_dataframes: Mapping[int, pd.DataFrame], |
if you're not going to modify, might as well make it immutable.
def _build_spot_traces_per_round( | ||
round_dataframes: Dict[int, pd.DataFrame], | ||
channels: Sequence[int], | ||
rounds: Sequence[int] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does round_dataframes.keys() contain the same data?
for i in range(len(conn_comps)): | ||
df_tmp = df.loc[conn_comps[i], :] | ||
kdT_tmp = KDTree(df_tmp.loc[:, [Axes.ZPLANE.value, Axes.Y.value, Axes.X.value]].values) | ||
# Check if all spots whitin a conn component are at most 1 pixels away |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Check if all spots whitin a conn component are at most 1 pixels away | |
# Check if all spots within a connected component are at most 1 pixels away |
intensity_tables : Dict[int, IntensityTable] | ||
Output from _merge_spots_by_round, contains mapping of intensity tables | ||
from each round to all the spots detected in them. | ||
channels, rounds : Sequence[int] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
channels not a param
search_radius : int | ||
Euclidean distance in pixels over which to search for spots in subsequent rounds. | ||
search_radius_max : int | ||
The maximum (euclidian) distance in pixels allowed between nodes belonging | ||
to the same sequence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kind of surprised these aren't floats
7e24890
to
d0e97c4
Compare
9ac3b89
to
0ace70b
Compare
d0e97c4
to
8c0b6ba
Compare
0ace70b
to
2ed0053
Compare
hey @mattcai can you review this PR? it would be nice to get it in to 0.3.0 if its ready |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## saxelrod-delete-old-detect-code #1613 +/- ##
===================================================================
+ Coverage 89.87% 90.24% +0.37%
===================================================================
Files 219 221 +2
Lines 8117 8550 +433
===================================================================
+ Hits 7295 7716 +421
- Misses 822 834 +12 ☔ View full report in Codecov by Sentry. |
This PR takes the work done by @gapartel in #1482 and modifies it to exist within the new spot finding modules.
h_max
was missing from out existing collection so I added it as well as tests for it.build_traces_graph_based()
instead ofdecode_spots()
PerRoundMax
with the parameterTraceBuildingStrategies.GRAPH
. Some examples can be shown in the notebookgraph_decoding.py